/**
 * @description 客户端二次渲染
 * @author xfj
 */

import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter, Route } from 'react-router-dom';
import { Provider } from 'react-redux';
import routes from '../share/route';
import store from './store';

ReactDOM.hydrate(<Provider store={store}>
  <BrowserRouter>
    {
      routes.map(routeProps => (
        <Route key={routeProps.path} {...routeProps} />
      ))
    }
  </BrowserRouter>
</Provider>, document.getElementById('root'));
